Skip to content

[core] Implement withFilter for TagsTable and FileKeyRangesTable#7874

Merged
JingsongLi merged 1 commit into
apache:masterfrom
heye1005:implement-with-filter-tags-filekeyranges-tables
May 18, 2026
Merged

[core] Implement withFilter for TagsTable and FileKeyRangesTable#7874
JingsongLi merged 1 commit into
apache:masterfrom
heye1005:implement-with-filter-tags-filekeyranges-tables

Conversation

@heye1005
Copy link
Copy Markdown
Contributor

Purpose

Implement withFilter for TagsRead / FileKeyRangesRead (was TODO, predicates were silently ignored).

FileKeyRangesRead excludes partition / bucket / level from the post-filter — already pushed down by scan, and re-evaluating them on the cast-to-string row breaks range predicates. Same pattern as FilesTable (#7791).

Tests

  • TagsTableTest: = / IN / <> on tag_name, filter on snapshot_id.
  • FileKeyRangesTableTest: record_count / schema_id, combined predicate, partition < '{11}' regression.

Replace the placeholder TODO in TagsRead#withFilter and
FileKeyRangesRead#withFilter with a read-side post-filter that evaluates
the predicate on the materialized row before projection.

For FileKeyRangesRead, partition / bucket / level are stripped out
before storing the post-filter because they are already pushed down by
FileKeyRangesScan; re-evaluating them on the materialized row would
compare values of incompatible representations (e.g. a String literal
vs the BinaryString in the row), mirroring the FilesTable behaviour
introduced in apache#7791.

Adds tests covering equal / in / not-equal / non-pushdown column /
combined pushdown + post-filter scenarios.
@JingsongLi
Copy link
Copy Markdown
Contributor

+1

@JingsongLi JingsongLi merged commit 3c43428 into apache:master May 18, 2026
12 checks passed
@heye1005 heye1005 deleted the implement-with-filter-tags-filekeyranges-tables branch May 18, 2026 15:52
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants